package com.whnk.attendance.threadpool.configfile;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@ConfigurationProperties(prefix = "cgc.thread")
public class ThreadPoolConfigProperties {

    private List<ThreadPoolVo> pool;

    public static class ThreadPoolVo {
        private Integer corePoolSize;
        private Integer maxPoolSize;
        private String threadNamePrefix;
        private String threadName;

        public Integer getCorePoolSize() {
            return corePoolSize;
        }

        public void setCorePoolSize(Integer corePoolSize) {
            this.corePoolSize = corePoolSize;
        }

        public Integer getMaxPoolSize() {
            return maxPoolSize;
        }

        public void setMaxPoolSize(Integer maxPoolSize) {
            this.maxPoolSize = maxPoolSize;
        }

        public String getThreadNamePrefix() {
            return threadNamePrefix;
        }

        public void setThreadNamePrefix(String threadNamePrefix) {
            this.threadNamePrefix = threadNamePrefix;
        }

        public String getThreadName() {
            return threadName;
        }

        public void setThreadName(String threadName) {
            this.threadName = threadName;
        }
    }

    public List<ThreadPoolVo> getPool() {
        return pool;
    }

    public void setPool(List<ThreadPoolVo> pool) {
        this.pool = pool;
    }
}
